#pragma once
namespace graph_basic
{
    namespace details
    {
    
    }
struct graph_view_t
{
    graph_view_t(graph_ptr_t graph_ptr)
      :  graph_ptr_(graph_ptr)
    {}
    virtual bool vertex_predicate(vertex_t const & v) const = 0;
    virtual bool edge_predicate(edge_t const & e) const = 0;
    
    graph_t& get_graph() const
    {
        return *graph_ptr_;
    }     
private:
    graph_ptr_t graph_ptr_;
};
typedef boost::shared_ptr<graph_view_t> graph_view_ptr_t;
struct graph_all_way_view_t: graph_view_t
{
    graph_all_way_view_t(graph_ptr_t graph_ptr)
      :  graph_view_t(graph_ptr)
    {}
    virtual bool vertex_predicate(vertex_t const & v) const
    {
        return true;
    }
    virtual bool edge_predicate(edge_t const & e) const
    {
        return true;
    }
};
struct graph_motor_way_view_t: graph_view_t
{
   graph_motor_way_view_t(graph_ptr_t graph_ptr)
      :  graph_view_t(graph_ptr)
   {}
   virtual bool vertex_predicate(vertex_t const & v) const
   {
      return true;
   }
   virtual bool edge_predicate(edge_t const & e) const
   {
      if (e.get_highway() >=1 && e.get_highway() <= 9)
         return true;
      else
         return false;
   }
};
struct graph_bicycle_view_t: graph_view_t
{
   graph_bicycle_view_t(graph_ptr_t graph_ptr)
      :  graph_view_t(graph_ptr)
   {}

   virtual bool vertex_predicate(vertex_t const & v) const
   {
      return true;
   }
   virtual bool edge_predicate(edge_t const & e) const
   {
      if ( (e.get_highway() >=2 && e.get_highway() <= 9) ||
           (e.get_highway() == 11)||
           (e.get_highway() == 13))
         return true;
      else
         return false;
   }
};


struct graph_foot_way_view_t: graph_view_t
{
   graph_foot_way_view_t(graph_ptr_t graph_ptr)
      :  graph_view_t(graph_ptr)
   {}
   virtual bool vertex_predicate(vertex_t const & v) const
   {
      return true;
   }
   virtual bool edge_predicate(edge_t const & e) const
   {
      if ( (e.get_highway() >=2 && e.get_highway() <= 11) 
           || (e.get_highway() == 14))
         return true;
      else
         return false;
   }
};
}